Optimal. Leaf size=60 \[ \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{2 x^2}+\frac {1}{2} \left (2 b+a c^2\right ) \tan ^{-1}\left (\sqrt {-1+c x} \sqrt {1+c x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {465, 94, 211}
\begin {gather*} \frac {1}{2} \left (a c^2+2 b\right ) \text {ArcTan}\left (\sqrt {c x-1} \sqrt {c x+1}\right )+\frac {a \sqrt {c x-1} \sqrt {c x+1}}{2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 94
Rule 211
Rule 465
Rubi steps
\begin {align*} \int \frac {a+b x^2}{x^3 \sqrt {-1+c x} \sqrt {1+c x}} \, dx &=\frac {a \sqrt {-1+c x} \sqrt {1+c x}}{2 x^2}+\frac {1}{2} \left (2 b+a c^2\right ) \int \frac {1}{x \sqrt {-1+c x} \sqrt {1+c x}} \, dx\\ &=\frac {a \sqrt {-1+c x} \sqrt {1+c x}}{2 x^2}+\frac {1}{2} \left (c \left (2 b+a c^2\right )\right ) \text {Subst}\left (\int \frac {1}{c+c x^2} \, dx,x,\sqrt {-1+c x} \sqrt {1+c x}\right )\\ &=\frac {a \sqrt {-1+c x} \sqrt {1+c x}}{2 x^2}+\frac {1}{2} \left (2 b+a c^2\right ) \tan ^{-1}\left (\sqrt {-1+c x} \sqrt {1+c x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 55, normalized size = 0.92 \begin {gather*} \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{2 x^2}+\left (2 b+a c^2\right ) \tan ^{-1}\left (\sqrt {\frac {-1+c x}{1+c x}}\right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 84, normalized size = 1.40
method | result | size |
default | \(-\frac {\sqrt {c x -1}\, \sqrt {c x +1}\, \left (\arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right ) a \,c^{2} x^{2}+2 \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right ) b \,x^{2}-\sqrt {c^{2} x^{2}-1}\, a \right )}{2 \sqrt {c^{2} x^{2}-1}\, x^{2}}\) | \(84\) |
risch | \(\frac {a \sqrt {c x -1}\, \sqrt {c x +1}}{2 x^{2}}+\frac {\left (-\arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right ) b -\frac {\arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right ) a \,c^{2}}{2}\right ) \sqrt {\left (c x +1\right ) \left (c x -1\right )}}{\sqrt {c x -1}\, \sqrt {c x +1}}\) | \(84\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.56, size = 45, normalized size = 0.75 \begin {gather*} -\frac {1}{2} \, a c^{2} \arcsin \left (\frac {1}{c {\left | x \right |}}\right ) - b \arcsin \left (\frac {1}{c {\left | x \right |}}\right ) + \frac {\sqrt {c^{2} x^{2} - 1} a}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.09, size = 57, normalized size = 0.95 \begin {gather*} \frac {2 \, {\left (a c^{2} + 2 \, b\right )} x^{2} \arctan \left (-c x + \sqrt {c x + 1} \sqrt {c x - 1}\right ) + \sqrt {c x + 1} \sqrt {c x - 1} a}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 114 vs.
\(2 (48) = 96\).
time = 0.61, size = 114, normalized size = 1.90 \begin {gather*} -\frac {{\left (a c^{3} + 2 \, b c\right )} \arctan \left (\frac {1}{2} \, {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{2}\right ) + \frac {2 \, {\left (a c^{3} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{6} - 4 \, a c^{3} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{2}\right )}}{{\left ({\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{4} + 4\right )}^{2}}}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.67, size = 297, normalized size = 4.95 \begin {gather*} \frac {\frac {a\,c^2\,1{}\mathrm {i}}{32}+\frac {a\,c^2\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}{16\,{\left (\sqrt {c\,x+1}-1\right )}^2}-\frac {a\,c^2\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^4\,15{}\mathrm {i}}{32\,{\left (\sqrt {c\,x+1}-1\right )}^4}}{\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {c\,x+1}-1\right )}^2}+\frac {2\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {c\,x+1}-1\right )}^4}+\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {c\,x+1}-1\right )}^6}}-b\,\left (\ln \left (\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {c\,x+1}-1\right )}^2}+1\right )-\ln \left (\frac {\sqrt {c\,x-1}-\mathrm {i}}{\sqrt {c\,x+1}-1}\right )\right )\,1{}\mathrm {i}-\frac {a\,c^2\,\ln \left (\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {c\,x+1}-1\right )}^2}+1\right )\,1{}\mathrm {i}}{2}+\frac {a\,c^2\,\ln \left (\frac {\sqrt {c\,x-1}-\mathrm {i}}{\sqrt {c\,x+1}-1}\right )\,1{}\mathrm {i}}{2}+\frac {a\,c^2\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}{32\,{\left (\sqrt {c\,x+1}-1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________